import { Button, Card } from 'antd';
import React, { useState } from 'react';
import styles from './index.less';

export default function Page() {
  const [loading, setLoading] = useState<boolean>(false);
  const handleSendMsg = () => {
    window.postMessage({ step: 2 }, window.location.href);
  };
  const handlePreviousStep = () => {
    window.postMessage({ step: 0 }, window.location.href);
  };
  return (
    <Card title="发布中" className={styles.card}>
      <Button onClick={handlePreviousStep}>上一步</Button>
      <Button type="primary" onClick={handleSendMsg} loading={loading}>下一步</Button>
    </Card>
  );
}
